﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SGDemo.Web
{
    public class FileIconBase
    {
        /// <summary>
        /// //根据文件的后缀名来判断是属于那种图片
        /// </summary>
        /// <param name="iconType">图片扩展类型</param>
        /// <returns>返回图标</returns>
        public static string getIconType(string iconExtensionType)
        {
            string FileIconExtensionName = string.Empty;
            switch (iconExtensionType.ToLower())
            {
                case ".doc": { FileIconExtensionName = "Word.png"; break; }
                case ".docx": { FileIconExtensionName = "Word.png"; break; }
                case ".xlsx": { FileIconExtensionName = "Excel.png"; break; }
                case ".xls": { FileIconExtensionName = "Excel.png"; break; }
                case ".pdf": { FileIconExtensionName = "Pdf.png"; break; }
                case ".ppt": { FileIconExtensionName = "4.png"; break; }
                case ".txt": { FileIconExtensionName = "Txt.png"; break; }
                case ".jpg": { FileIconExtensionName = "Jpg.png"; break; }
                case ".gif": { FileIconExtensionName = "Gif.png"; break; }
                case ".avi": { FileIconExtensionName = "Avi.png"; break; }
                case ".bmp": { FileIconExtensionName = "bmp.png"; break; }
                case ".png": { FileIconExtensionName = "Png.png"; break; }
                case ".file": { FileIconExtensionName = "File.png"; break; }
                case ".psd": { FileIconExtensionName = "Psd.png"; break; }
                case ".wmf": { FileIconExtensionName = "wmf.png"; break; }
                case ".tif": { FileIconExtensionName = "Tif.png"; break; }
                case ".rar": { FileIconExtensionName = "RaR.png"; break; }
                default: { FileIconExtensionName = "File.png"; break; }
            
            }
            return FileIconExtensionName;
        }

    }
}